﻿<UserControl x:Class="Headsight.BPMN2WF.ConversionWizard.BPMN2WFConverter"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="600">
    
    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BooleanVisibility" />
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
            
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="200" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <Border Grid.Column="0" Padding="10" Background="#EEEEEE">
                <StackPanel>
                    <Image Height="47" Name="image1" Stretch="Fill" Width="179" Source="Images/logo_medium.png" />
                    <TextBlock Text="BPMN2WF" Padding="0,20,10,10" FontSize="14" FontWeight="Bold" />
                    <TextBlock Text="Convert BPMN Project Files" Padding="0,10,10,5" FontSize="12" />
                    <TextBlock Text="to Workflow 4 XAML" Padding="0,0,10,10" FontSize="12" />
                </StackPanel>
            </Border>
            
            <!-- Step 1 -->
            <Border Grid.Column="1" Background="White" Visibility="{Binding Step1Active, Converter={StaticResource BooleanVisibility}}">
                <StackPanel Margin="20">
                    <TextBlock Text="Open BPMN File" FontSize="14" FontWeight="Bold" Padding="0,0,0,20" />
                    <Button Name="BtnOpenBpmn" Content="Browse..." Width="100" Padding="5" HorizontalAlignment="Left" Click="BtnOpenBpmn_Click" />
                    <TextBlock Text="{Binding BpmnFileName}" Padding="0,20,0,0" FontSize="12" />
                </StackPanel>
            </Border>

            <!-- Step 2 -->
            <Border Grid.Column="1" Background="White" Visibility="{Binding Step2Active, Converter={StaticResource BooleanVisibility}}">
                <StackPanel Margin="20">
                    <TextBlock Text="Properties" FontSize="14" FontWeight="Bold" />
                    <TextBlock Text="Conversion Properties" Padding="0,20,0,10" FontWeight="Bold" />
                    <CheckBox Name="CbSimplify" IsChecked="{Binding Simplify}" Content="Simplify created XAML" />
                    <CheckBox Name="CbBeautify" IsChecked="{Binding Beautify}" Content="Beautify created XAML" Margin="0,10,0,0" />
                    <TextBlock Text="Choose Converter" Padding="0,20,0,0" FontWeight="Bold" />
                    <ComboBox Name="ComboTransformator" ItemsSource="{Binding TransformatorList}" DisplayMemberPath="Name" SelectedItem="{Binding CurrentTransformator}" />
                    <StackPanel Visibility="{Binding ConfigurationTransformatorSelected, Converter={StaticResource BooleanVisibility}}">
                        <TextBlock Text="Choose Configuration File" FontSize="12" Padding="0,10,0,0" />
                        <Button Name="BtnOpenMapping" Content="Browse..." Width="100" Padding="5" HorizontalAlignment="Left" Click="BtnOpenMapping_Click" />
                        <TextBlock Text="{Binding MappingConfigurationFilename}" Padding="0,10,0,0" FontSize="12" />
                    </StackPanel>
                </StackPanel>
            </Border>

            <!-- Step 3 -->
            <Border Grid.Column="1" Background="White" Visibility="{Binding Step3Active, Converter={StaticResource BooleanVisibility}}">
                <StackPanel Margin="20">
                    <TextBlock Text="{Binding ConversionText}" FontSize="14" FontWeight="Bold" Padding="0,0,0,20" />
                    <Grid x:Name="DesignerGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="0" />
                        </Grid.ColumnDefinitions>
                    </Grid>
                </StackPanel>
            </Border>

            <Border Grid.Column="1" Background="White" Visibility="{Binding ErrorActive, Converter={StaticResource BooleanVisibility}}">
                <StackPanel Margin="20">
                    <TextBlock Text="An error occured" FontSize="14" FontWeight="Bold" Padding="0,0,0,20" />
                    <TextBlock Text="{Binding ErrorText}" TextWrapping="WrapWithOverflow" />
                </StackPanel>
            </Border>
        </Grid>

        <Border Background="#D3D3D3" Grid.Row="1" Padding="10">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                <Button Name="BtnPrev" Content="Previous" Padding="5" Width="100" Margin="5" Visibility="{Binding PrevVisible, Converter={StaticResource BooleanVisibility}}" IsEnabled="{Binding PrevEnabled}" Click="BtnPrev_Click" />
                <Button Name="BtnNext" Content="{Binding NextButtonText}" Padding="5" Width="100" Margin="5" IsEnabled="{Binding NextEnabled}" Click="BtnNext_Click" />
                <Button Name="BtnCancel" Content="Cancel" Padding="5" Width="100" Margin="10,5,5,5" Click="BtnCancel_Click" />
            </StackPanel>
        </Border>
    </Grid>


    <!--<Grid.RowDefinitions>
        <RowDefinition Height="auto" />
        <RowDefinition Height="*" />
        <RowDefinition Height="auto" />
    </Grid.RowDefinitions>

    <Grid Grid.Row="0">
        <Border>
            <StackPanel Orientation="Horizontal">
                <Button Name="btnOpenBpmn" Content="Open BPMN" Click="OpenBpmn_Click" />
                <Button Name="btnOpenBpmn2" Content="Beautify" Click="OpenBpmn2_Click" />
                <Button Name="btnOpenBpmn3" Content="Take this" Click="TakeThis_Click" />
            </StackPanel>
        </Border>
    </Grid>

-->
</UserControl>
